﻿using System.Collections.Generic;
using System.Web.Mvc;
using tophd.Models.Entity;
using tophd.Models.Service;

namespace tophd.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            CategoryService s1 = new CategoryService();
            //List<Category> pListCate = s1.GetCategory(0);
            VideoService s = new VideoService();
            List<Video> vlistHot = s.GetVideo(0,1,0,10); //1: download
            List<Video> vlistNew = s.GetVideo(0, 0, 0, 10); //0: moi nhat
            
            ViewData["listVideoHost"] = vlistHot;
            ViewData["listVideoNew"] = vlistNew;
            
            return View();
        }

        public ActionResult VideoByCategory()
        {
            CategoryService s1 = new CategoryService();
            List<Category> videoCategory = s1.GetCategory(0, 9);
            ViewData["videoCategory"] = videoCategory;
            //VideoService vs = new VideoService();
            //Video video = vs.GetDetailVideo(videoId);
            //ViewData["DetailVideo"] = video;
            return View();
        }

    }
}
